package com.dikeleakagedetection.myapplication.logic.dao

import androidx.room.*

@Dao
interface TabletDao {
    @Insert
    fun insertTablet(tablet: Tablet): Long

    @Update
    fun updateTablet(newTablet: Tablet)

    @Query("select * from Tablet")
    fun loadAllTablets(): List<Tablet>

    @Query("select * from Tablet where id = :id")
    fun loadTabletById(id: Long): Tablet?

    @Query("select * from Tablet where id = :userId")
    fun loadTabletByUserId(userId: Long): List<Tablet>

    @Delete
    fun deleteDot(tablet: Tablet)
}